    # C::B core begin

    Section "!Core Files (required)" SEC_CORE
        SectionIn 1 2 3 4 RO
        # If $INSTDIR is present, ask the user if that is OK
        IfFileExists $INSTDIR 0 doInstall
            # It appears $INSTDIR is present (and not empty).
            # Ask the user to probably abort installation process.
            MessageBox MB_YESNO|MB_ICONQUESTION \
                "The target directory does already exist. OK to continue anyways?$\r$\n(If you are unsure and want to keep the folder, click No.)" \
                /SD IDNO IDYES continueInstall IDNO abortInstall
abortInstall:
            # If user selected "no" -> abort the installation
            DetailPrint "Aborting installation."
            Abort
continueInstall:
            # fall through
doInstall:
        SetOutPath $INSTDIR
        # Verify if creating/accessing the target folder succeeded.
        # If not, issue an error message and abort installation
        IfErrors 0 accessOK
            MessageBox MB_OK|MB_ICONEXCLAMATION \
                "Cannot create the target folder.$\r$\nInstallation cannot continue.$\r$\n(Probably missing access rights?)" \
                /SD IDOK
            DetailPrint "Aborting installation."
            Abort
accessOK:
        SetOverwrite on
        File ${CB_BASE}\cb_console_runner.exe
        File ${CB_BASE}\codeblocks.dll
        File ${CB_BASE}\codeblocks.exe
        File ${CB_BASE}\exchndl.dll
        File ${CB_BASE}\mingwm10.dll
		File ${CB_BASE}\wxchartctrl.dll
		File ${CB_BASE}\wxcustombutton.dll
		File ${CB_BASE}\wxflatnotebook.dll
        File ${CB_BASE}\wxmsw28u_gcc_cb.dll
        File ${CB_BASE}\wxscintilla.dll
		File ${CB_BASE}\wxsmithlib.dll
        SetOutPath $INSTDIR\share\CodeBlocks
        File ${CB_SHARE_CB}\start_here.zip
        File ${CB_SHARE_CB}\tips.txt
        File ${CB_SHARE_CB}\manager_resources.zip
        File ${CB_SHARE_CB}\resources.zip
        SetOutPath $INSTDIR\share\CodeBlocks\docs
        File ${CB_DOCS}\codeblocks.chm
        File ${CB_DOCS}\index.ini
        SetOutPath $INSTDIR\share\CodeBlocks\scripts
        File ${CB_SCRIPTS}\*.script
        SetOutPath $INSTDIR\share\CodeBlocks\templates
        File ${CB_TEMPLATES}\*.*
        SetOutPath $INSTDIR\share\CodeBlocks\images
        File ${CB_IMAGES}\*.png
        SetOutPath $INSTDIR\share\CodeBlocks\images\16x16
        File ${CB_IMG_16}\*.png
        SetOutPath $INSTDIR\share\CodeBlocks\images\settings
        File ${CB_IMG_SETTINGS}\*.png
    SectionEnd

    # C::B core end

